var direction:boolean = false;
var counter:int = 0;
var speed:float = 10;

function Update () {
	
	if(direction == false){
		transform.Translate(Vector3.up * Time.deltaTime * speed);
	} else if(direction == true){
		transform.Translate(Vector3.down * Time.deltaTime * speed);
	}
	
	
	if(counter > 50)
	{
		if(direction == false)
		{
			direction = true;
		} else {
			direction = false;
		}
		counter = 0;
	}
	counter ++;
}